STW/Advisor(tm), part of the fully integrated TestWorks multi-platform suite of testing tools, analyzes source code to provide measurements and reports that aid in the management of project development. Three components are included in STW/Advisor: METRIC(tm) for quantitative analysis, STATIC(tm) for semantic and syntax analysis, and TDGEN(tm) for test data/file generation.

METRIC analyzes C, C++, Ada or FORTRAN source and calculates the Halstead Software Science Metrics to measure data complexity, the Cyclomatic Complexity Metrics to assess logic complexity, and basic size metrics, such as number of lines, comments and executable statements.

METRIC'S output includes a full report, which provides a set of metrics for each of the modules in a given source file; a summary report; an exception report, which lists where the code exceeds user-defined metric thresholds; and Kiviat Charts.

Software Science metrics derive hybrid metrics that include program length, predicted length, purity ratio, volume, and effort.

Cyclomatic Complexity Metrics determine the control-flow complexity of a program, based on the number and arrangement of decision points within the code.

Extended Cyclomatic Complexity determine the control-flow complexity of a program, based on the decision-making predicates.

Size Metrics include number of lines of code, number of blank lines, number of comment lines and the number of executable statements.

C programs are often the source of obscure bugs; many compilers pass bugs as legal C statements. STATIC handles C's unique problems by providing detailed syntax and semantic error/inconsistency reports for C programs.

A message report displays the source-code line, the file name, the line number, and a brief message about the problem. This includes syntax and semantic messages, warning messages, information messages, and elective notes.

Reports can be configured to display only selected types of messages.

STATIC is more detailed than a compiler. It points out code that is legal C, but is probably not what was intended, such as assignment (=) versus test (==), use of bitwise operators (& or | versus && or !!), never executed code or an empty for loop.

STATIC also looks across all source files to see if variable references and function-call parameters match; it identifies non-portable constructs, identifying pointer/pointer mixing, different sizes for short, int and long, problems when char is used to hold a character, signed/unsigned quantities, character set differences, and identifier length.

In order to make up for limited resources and more fully test applications, TDGEN creates additional tests from existing tests.

A Template File describes how selected test data values are to be placed in a typical test file.

A Values File indicates the actual input test values, test value ranges or test value generation rules for data descriptors that appear in the template file.

TDGEN processes the values file by constructing a data table with field names as keys, then scans the template file for special syntax with identifier field names, and finally substitutes values from the data table associated with corresponding field names. TDGEN selects test values from the data table sequentially, randomly, specifically, or calculates the total number of combinations possible.